<?php require_once('include/header1.php'); ?>
<?PHP
    require_once("admin_functions.php");
    chk_session();

    require_once("classes/admin_users.php");

    $temp_user_id=0;
    if($_GET['user_id']) {
        $temp_user_id = $_GET['user_id'];
    } elseif ($_POST['user_id']) {
        $temp_user_id = $_POST['user_id'];
    }

    if($temp_user_id) {
        $usertObj=new admin_users($temp_user_id);
    } else {
        $usertObj=new admin_users("");
    }

    if($_POST['Submit_x'] != "") {
        $usertObj->modifiedby_userid=$_SESSION['gbl_user_id'];
        $mesg  = $usertObj->mod_user_pwd($_POST['old_password'], $_POST['new_password']);
    }
?>
<?php require_once('include/sidebar.php'); ?>
<div id="admin_full_inner_body">


    <div id="inner_page_middle_data">
        <div id="page_heading">Change Password</div>
        <div id="cp_caution">This password is very important.<br />
            Please note down the new password somewhere.</div>
        <div id="admin_cp_container">
            <form name="frm" method="POST" action="change_password.php" onsubmit="javascript:return validatePwd(this)">
                <div id="admin_cp_row"><? if($mesg) { ?></div>
                <div id="admin_cp_row"><?=$mesg?></div>
                <div id="admin_cp_row"><? } ?></div>
                <div id="admin_cp_row">
                    <div id="admin_cp_text">Your current password :</div>
                    <div id="admin_cp_input"><input class="textbox"  name="old_password" type="password" maxlength="50" onkeypress="return ValidateAlphaNumeric(this,event);" style="width:150px; height:15px;"></div>
                </div>
                <div id="admin_cp_row">
                    <div id="admin_cp_text">New Password :</div>
                    <div id="admin_cp_input"><input class="textbox"  name="new_password" type="password" maxlength="50" onkeypress="return ValidateAlphaNumeric(this,event);" style="width:150px; height:15px;" /></div>
                </div>
                <div id="admin_cp_row">
                    <div id="admin_cp_text">Confirm Password :</div>
                    <div id="admin_cp_input"><input class="textbox"  name="retype_password" type="password" size="30" maxlength="50" onkeypress="return ValidateAlphaNumeric(this,event);" style="width:150px; height:15px;" /></div>
                </div>
                <div id="admin_cp_row">
                    <div id="admin_cp_text">&nbsp;</div>
                    <div id="admin_cp_input"><input type="image" name="Submit" value="Y" src="../images/images/search_go.gif" width="55" height="22" border="0" style="border:none;"></div>
                </div>
                <div id="admin_cp_row"><input class="text-field"  name="user_id" type="hidden" value="<?=$user_id?>"></div>
                <div id="admin_cp_row"><input class="text-field"  name="action" type="hidden" value="Modify"></div>
            </form>
        </div>
    </div>
</div>



<?php require_once('include/footer1.php'); ?>
